package com.hdaccp.letting.consumer;

import com.alibaba.dubbo.config.annotation.Reference;
import com.hdaccp.letting.entity.User;
import com.hdaccp.letting.service.UserService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class UserConsumer {
    @Resource(name = "userService")
    private UserService userService ;
    public void showUser(){
        User user = userService.getUser(3) ;
        System.out.println(user.getId() + " -- " + user.getName() + " -- " + user.getAddress());
    }
}
